<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./vue.js"></script>
  <style>
    .box{
      width:400px;
      height:400px;
      border:1px solid #ccc;
    }
    .box2{
      width:200px;
      height:200px;
      background-color: rgb(226, 34, 34);
    }
  </style>
</head>
<body>
  <div id="box">
    <div class="box" @click="fn1">div1
      <div class="box2" @click.stop="fn2">div2</div>
    </div>
  </div>

  <script>


    let vm = new Vue({
      el:"#box",
      data:{  
       msg:"msg"
      },
      methods:{
        fn1(){
          alert(1)
        },
        fn2(){
          alert(2)
        }
      }
    });

  
    console.log(vm);
  </script>
</body>
</html>